<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>继承3</title>
</head>

<body>
    <div id="app"></div>
</body>
<script>
    //3.构造函数绑定
    function Person(head, foot, hand) {
        this.foot = foot
        this.head = head
        this.hand = hand
    }

    function Student(id, name, head, foot, hand) {
        //Person.call(this,head,foot,hand)
        Person.apply(this, [head, foot, hand])
        this.id = id
        this.name = name
        this.show = function () {
            return "{hand=" + this.hand + ",id=" + this.id + ",name=" + this.name + ",foot=" + this.foot +
                ",head=" + this.head + "}"
        }
    }
    let stu = new Student(1, "tom", 1, 2, 2)
    app.innerHTML = stu.show()
</script>

</html>